package Model;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Order {
   int order_id;
   int user_id;
   String username;
   int food_id;
   String foodname;
   int num;
   double sum;
   Date ordertime;
   String  suggesttime;
   String content;
   Date comment_time;
   static SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
   String ordertime_str;
   String comment_time_str;
   
public SimpleDateFormat getF() {
	return f;
}
public void setF(SimpleDateFormat f) {
	this.f = f;
}
public Order(int order_id, int user_id, String username, int food_id, String foodname, int num, double sum,
		Date ordertime, String suggesttime, String content, Date comment_time) {
	super();
	this.order_id = order_id;
	this.user_id = user_id;
	this.username = username;
	this.food_id = food_id;
	this.foodname = foodname;
	this.num = num;
	this.sum = sum;
	this.ordertime = ordertime;
	this.suggesttime = suggesttime;
	this.content = content;
	this.comment_time = comment_time;
	this.ordertime_str = f.format(ordertime);
	if(this.comment_time!=null)
	this.comment_time_str = f.format(comment_time);
}
public Order() {
	super();
	// TODO Auto-generated constructor stub
}
public int getOrder_id() {
	return order_id;
}
public void setOrder_id(int order_id) {
	this.order_id = order_id;
}
public int getUser_id() {
	return user_id;
}
public void setUser_id(int user_id) {
	this.user_id = user_id;
}
public String getUsername() {
	return username;
}
public void setUsername(String username) {
	this.username = username;
}
public int getFood_id() {
	return food_id;
}
public void setFood_id(int food_id) {
	this.food_id = food_id;
}
public String getFoodname() {
	return foodname;
}
public void setFoodname(String foodname) {
	this.foodname = foodname;
}
public int getNum() {
	return num;
}
public void setNum(int num) {
	this.num = num;
}
public double getSum() {
	return sum;
}
public void setSum(double sum) {
	this.sum = sum;
}
public Date getOrdertime() {
	return ordertime;
}
public void setOrdertime(Date ordertime) {
	this.ordertime = ordertime;
}
public String getSuggesttime() {
	return suggesttime;
}
public void setSuggesttime(String suggesttime) {
	this.suggesttime = suggesttime;
}
public String getContent() {
	return content;
}
public void setContent(String content) {
	this.content = content;
}
public Date getComment_time() {
	return comment_time;
}
public void setComment_time(Date comment_time) {
	this.comment_time = comment_time;
}
public String getOrdertime_str() {
	return ordertime_str;
}
public void setOrdertime_str(String ordertime_str) {
	this.ordertime_str = ordertime_str;
}
public String getComment_time_str() {
	return comment_time_str;
}
public void setComment_time_str(String comment_time_str) {
	this.comment_time_str = comment_time_str;
}
   
}
